﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace MTC.Common
{
    public static class Utils
    {
        public static string ChangeFormat(DateTime dtm)
        {
           CultureInfo culture = new CultureInfo("en-AU");
            return dtm.ToString("dd/MM/yyyy",culture);  
         
        }
        public static string ChangeFormat(DateTime? dtm)
        {
            if (!dtm.HasValue) return string.Empty; 
            DateTime dateTime = new DateTime(dtm.Value.Year, dtm.Value.Month, dtm.Value.Day);
            CultureInfo culture = new CultureInfo("en-AU");
            return dateTime.ToString("dd/MM/yyyy", culture);

        }

    }
}
